#!/bin/sh

## You only need to change this part
export TIDB_HOST='xxxxxxxx.aws.tidbcloud.com'
export TIDB_PORT='4000'
export TIDB_USER='xxxxxxxxxxx.root'
export TIDB_PASSWORD='xxxxxxx'
export TIDB_DB_NAME='test'
export USE_SSL='true'

## Do not change the following part
jdbc_url="jdbc:mysql://${TIDB_HOST}:${TIDB_PORT}/${TIDB_DB_NAME}"
if [ 'true' == "${USE_SSL}" ]; then
  jdbc_url="${jdbc_url}?sslMode=VERIFY_IDENTITY&enabledTLSProtocols=TLSv1.2,TLSv1.3"
fi

export TIDB_JDBC_URL=${jdbc_url}
